﻿using Covid.Server.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Covid.Server.Services
{

    /// <summary>
    /// 员工 仓储接口
    /// </summary>
    public interface IEmployeeRepository
    {
        /// <summary>
        /// 根据部门编码获得该部门所有的员工信息
        /// </summary>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        Task<IList<Employee>> GetForDepartmentAsync(int departmentId);

        /// <summary>
        /// 获得某一个员工
        /// </summary>
        /// <returns></returns>
        Task<Employee> GetOneAsync(int departmentid, int id);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="employee"></param>
        /// <returns></returns>
        Task<Employee> AddAsync(Employee employee);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="emplyee"></param>
        /// <returns></returns>
        Task UpdateAsync(Employee emplyee);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(int id);
        
    }
}
